<script setup>
import { storeToRefs } from 'pinia';
import { ref } from 'vue'
import { useGlobalStore } from '@/stores/golbal'
import HomePageComp from "@/components/mainPages/HomePageComp.vue"
import LoginPageComp from "@/components/mainPages/LoginPageComp.vue"
import RegisterPageComp from "@/components/mainPages/RegisterPageComp.vue"
import findPasswordPageComp from "@/components/mainPages/findPasswordPageComp.vue"
let { mainPageTypeIndex ,mainPageTypeList} = storeToRefs(useGlobalStore())

//test
// mainPageTypeIndex.value = mainPageTypeList.value.findPasswordPage.id
</script>
<template>
  <!-- 主页 -->
  <div v-if="mainPageTypeIndex == mainPageTypeList.HomePage.id">
    <HomePageComp />
  </div>
  <!-- 产品展示 -->
  <div v-else-if="mainPageTypeIndex == mainPageTypeList.ProductShowPage.id">
    <ProductShowPageComp />
  </div>
  <!-- 咨询信息 -->
  <div v-else-if="mainPageTypeIndex == mainPageTypeList.ConsultationPage.id">
    <ConsultationPageComp />
  </div>
  <!-- 秒杀 -->
  <div v-else-if="mainPageTypeIndex == mainPageTypeList.SeckillPage.id">
    <SeckillPageComp />
  </div>
  <!-- 加盟 -->
  <div v-else-if="mainPageTypeIndex == mainPageTypeList.JoinPage.id">
    <JoinPageComp />
  </div>
  <!-- 公司介绍 -->
  <div v-else-if="mainPageTypeIndex == mainPageTypeList.AboutPage.id">
    <AboutPageComp />
  </div>
  <!-- 注册 -->
  <div v-else-if="mainPageTypeIndex == mainPageTypeList.RegisterPage.id">
    <RegisterPageComp />
  </div>
  <!-- 登录 -->
  <div v-else-if="mainPageTypeIndex == mainPageTypeList.LoginPage.id">
    <LoginPageComp />
  </div>
  <!-- 找回密码 -->
  <div v-else-if="mainPageTypeIndex == mainPageTypeList.findPasswordPage.id">
    <findPasswordPageComp />
  </div>
</template>
<style scoped></style>